package com.runjian.rundo.iot.agent.common.network.tcp.client.session;

import com.runjian.rundo.iot.agent.common.network.tcp.client.TcpNetworkClient;
import com.runjian.rundo.iot.agent.common.network.tcp.session.TcpDeviceSession;

import io.netty.channel.Channel;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * Tcp客户端Session
 * 
 * @author CaoQingHua
 */
@Slf4j
@Getter
@Setter
public class TcpClientDeviceSession extends TcpDeviceSession {

    private TcpNetworkClient tcpNetworkClient;

    public TcpClientDeviceSession(TcpNetworkClient tcpNetworkClient, Channel channel) {
        super(channel);
        this.tcpNetworkClient = tcpNetworkClient;
    }

    @Override
    public Channel getChannel() {
        return super.getChannel();
    }

    public String getId() {
        return tcpNetworkClient.getId();
    }

}
